package org.jeecgframework.web.service;
import java.io.Serializable;
import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.jeecgframework.core.common.service.CommonService;
import org.jeecgframework.web.system.pojo.base.CbsProcurementNoteEntity;
import org.jeecgframework.web.system.pojo.base.CbsQuotationDetailEntity;
import org.jeecgframework.web.system.pojo.base.CbsQuotationEntity;
import org.jeecgframework.web.system.pojo.base.ZyEquipmentSpareEntity;

public interface CbsQuotationServiceI extends CommonService{
	
 	public <T> void delete(T entity);
 	
 	public <T> Serializable save(T entity);
 	
 	public <T> void saveOrUpdate(T entity);
 	
 	/**
	 * 默认按钮-sql增强-新增操作
	 * @param id
	 * @return
	 */
 	public boolean doAddSql(CbsQuotationEntity t);
 	/**
	 * 默认按钮-sql增强-更新操作
	 * @param id
	 * @return
	 */
 	public boolean doUpdateSql(CbsQuotationEntity t);
 	/**
	 * 默认按钮-sql增强-删除操作
	 * @param id
	 * @return
	 */
 	public boolean doDelSql(CbsQuotationEntity t);
 	
 	/**
 	 * 生成报价单号
 	 * @param note 订单
 	 * @return
 	 */
 	public String genQuotationNumber(CbsProcurementNoteEntity note);
 	
 	/**
 	 * 生成报价单明细
 	 * @param note 采购单
 	 * @param quotation 报价单
 	 * @param discount 折扣
 	 * @return
 	 */
 	public List<CbsQuotationDetailEntity> genQuotationDetail(CbsProcurementNoteEntity note,CbsQuotationEntity quotation);
 	
 	/**
 	 * 判断设备是否横店或中影的、
 	 * @param es
 	 * @return  y、h、n y=中影 h=横店 n=其他
 	 */
 	public String getEsDepart(ZyEquipmentSpareEntity es);
 	
 	/**
 	 * 生成报价单excel
 	 * @param quotation
 	 * @param request
 	 * @return
 	 */
 	public String genQuotationExcel(CbsQuotationEntity quotation,HttpServletRequest request);

    /**
     * 判断是否可有hd生成报价单
     * @param note
     * @return
     */
    public boolean canReportQuotationByHd(CbsProcurementNoteEntity note);

    public CbsQuotationEntity createQuotation(CbsProcurementNoteEntity note,String type);
}
